package com.smartum.mpr.client.utils;

import com.google.gwt.user.client.History;

/**
 * Helper class which accumulate logic, related to history navigations.
 */
public class HistoryHelper {

    public static final String LOGIN_TOKEN = "login_page";
    public static final String ADMIN_TOKEN = "admin_console";
    public static final String NEWS_TOKEN = "news";
    public static final String ITEMS_TOKEN = "items";
    public static final String JOBS_TOKEN = "jobs";

    /**
     * Navigate to the defined token.
     */
    public static void navigateToken(String token) {

        History.newItem(token);
        History.fireCurrentHistoryState();
    }
}
